﻿// ==UserScript==
// @name            Proxy
// @author	    Cye3s
// @include         *
// ==/UserScript==

(function () {
  if(document.documentURI.substr(0,14)=="about:neterror")
  {
    var error_div = document.getElementById("errorLongDesc");
    var error_btn = document.getElementById("errorTryAgain");
    var securityOverride_Div = document.getElementById("securityOverrideDiv");
    if (error_div && error_btn && !securityOverride_Div)
    {
      a=document.createElement("a"); 
      a.name='Psiphon2'; 
      var loc =content.location+"";
      loca = loc.replace("http://","");
      a.href='https://mirrorrr.appspot.com/'+loca; 
      a.innerHTML="用代理访问";
      a.setAttribute("style","margin-left:20px;"+
	                     "font-size:10pt;"+
			     "color:black;"+
			     "text-decoration:none;");
      error_btn.parentNode.appendChild(a);
    }
  }
})();